<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .buttons-hbox{
            font-size: 2em;
        }
    </style>
</head>
<body >
   <span class="buttons-hbox">输入日期格式如：1993-03-06</span><br/>
  <input type="date" id="de" style="font-size: 2em"/><br/>
   <button id="btn" style="font-size: 2em">确定</button><br/>
   <span class="buttons-hbox">阳历：<span id="yangli"></span></span>
   <span class="buttons-hbox" >阴历：<span id="yinli"></span></span>

</body>
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>

    $("#btn").click(function () {
        var date=$("#de").val();
        var url='http://v.juhe.cn/laohuangli/d'
        var param='?date='+date+'&key=c973ddcc0f55d9f9596c912acf1c4b07'
        var ur=url+param
        var uri='test/huangli'
        console.log(date)
        if(date===''){
            alert("请填日期")
        }
        $.get(uri,{date:date},function (data) {
            console.log(data)
            $("#yangli").empty()
            $("#yinli").empty()

            $("#yangli").text(data.result.yangli)
            $("#yinli").text(data.result.yinli)
        },"json")
    })


</script>
</html>